package com.demo.arthas;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: 黄嘉振
 * @create: 2023/5/11 9:52
 * @description:    配置arthas，按需启动arthas agent，通过较jmx控制
 **/
@Configuration
@EnableConfigurationProperties({ArthasProperties.class})
public class ArthasConfiguration {

    @ConfigurationProperties(prefix = "arthas")
//    @ConditionalOnMissingBean
    @Bean
    public Map<String, String> arthasConfigMap() {
        return new HashMap<String, String>();
    }
}
